package project.model;

import java.awt.Point;

public class RoomFactory extends AFactory{
    private static AFactory isSingleton;
    
    public static AFactory getRoomFactory() {
        if(RoomFactory.isSingleton == null){
            RoomFactory.isSingleton = new RoomFactory();
        }
        return RoomFactory.isSingleton;
    }
    
    @Override
    public ARoom createRoom(int index, Point point) {
        return new Room(index, point);
    }

    @Override
    public MagicRoom createMagicRoom(int index, Point point, String question) {
        return new MagicRoom(index, point, question);
    }

}
